using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Xml.Serialization;

namespace Magnet.Framework.Syndication.Interfaces
{
    /// <summary>
    /// Contains information about the channel (metadata) and its contents.
    /// </summary>
    /// <seealso cref="http://cyber.law.harvard.edu/rss/rss.html"/>
    [ISerializable]
    [XmlRoot("channel")]
    public interface IRSSChannel
    {
        /// <summary>
        /// Gets or sets the name of the channel.
        /// </summary>
        /// <remarks>
        /// It's how people refer to your service. If you have an HTML website that contains the same information as your RSS file, 
        /// the title of your channel should be the same as the title of your website.
        /// </remarks>
        string Title { get;set; }

        /// <summary>
        /// Gets or sets the URL to the HTML website corresponding to the channel.
        /// </summary>
        Uri Link { get;set; }

        /// <summary>
        /// Gets or sets the phrase or sentence describing the channel.
        /// </summary>
        string Description { get;set; }

        /// <summary>
        /// Gets or sets the language the channel is written in.
        /// </summary>
        /// <remarks>
        /// This allows aggregators to group all Italian language sites, for example, on a single page. 
        /// A list of allowable values for this element, as provided by Netscape(<see cref="http://cyber.law.harvard.edu/rss/languages.html"/>). 
        /// You may also use values defined by the W3C(<see cref="http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes"/>).
        /// </remarks>
        string Language { get;set; }

        /// <summary>
        /// Gets or sets the copyright notice for content in the channel.
        /// </summary>
        string Copyright { get;set; }

        /// <summary>
        /// Gets or sets the email address for person responsible for editorial content.
        /// </summary>
        string managingEditor { get;set; }

        /// <summary>
        /// Gets or sets the email address for person responsible for technical issues relating to channel.
        /// </summary>
        string WebMaster { get;set; }

        /// <summary>
        /// Gets or sets the publication date for the content in the channel.
        /// </summary>
        /// <remarks>
        /// For example, the New York Times publishes on a daily basis, the publication date flips once every 24 hours. 
        /// That's when the pubDate of the channel changes. All date-times in RSS conform to the Date and Time Specification of RFC 822 (<see cref="http://asg.web.cmu.edu/rfc/rfc822.html"/>), 
        /// with the exception that the year may be expressed with two characters or four characters (four preferred).
        /// </remarks>
        DateTime PublishedDate { get;set; }

        /// <summary>
        /// Gets or sets the last time the content of the channel changed.
        /// </summary>
        DateTime LastBuildDate { get;set; }

        /// <summary>
        /// Gets or sets the one or more categories that the channel belongs to.
        /// </summary>
        List<string> Categories { get;set; }

        /// <summary>
        /// Gets or sets the program used to generate the channel.
        /// </summary>
        [DefaultValue("Magnet Framework")]
        string Generator { get;set; }

        /// <summary>
        /// Gets or sets the URL that points to the documentation for the format used in the RSS file.
        /// </summary>
        /// <remarks>
        /// It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.
        /// </remarks>
        [DefaultValue("http://cyber.law.harvard.edu/rss/rss.html")]
        Uri Docs { get;set; }

        /// <summary>
        /// Gets or sets the cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.
        /// </summary>
        IRSSCloud Cloud { get;set; }

        /// <summary>
        /// Gets or sets the number of minutes that indicates how long a channel can be cached before refreshing from the source.
        /// </summary>
        int TimeToLive { get;set; }

        /// <summary>
        /// Gets or sets the GIF, JPEG or PNG image that can be displayed with the channel.
        /// </summary>
        IRSSChannelImage Image { get;set; }

        /// <summary>
        /// Gets or sets the hint for aggregators telling them which hours they can skip.
        /// </summary>
        List<int> SkipHours { get;set; }

        /// <summary>
        /// Gets or sets the hint for aggregators telling them which days they can skip.
        /// </summary>
        List<string> SkipDays { get;set; }
    }
}
